/**
 * author: Evan
 * date: Feb 24, 2009
 * Description: a RemoteController interface for controlling a remote truck
 * Modified: 
 * 	Feb 24, 2009 - initial setup - evan
 */
package white440.common;

import java.net.InetAddress;
import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * An interface that should be implemented by any class that wants to control a RemoteTruck
 * @author evan
 *
 */
public interface RemoteController extends Remote {

	public static final String RMINAME = "controller";
	
	/**
	 * called to check if you can currently communicate with this controller.
	 * if you can communicate this method returns true.
	 * if you can't communicate with the controller this method throws a RemoteException.
	 * @return true
	 * @throws RemoteException if there is a communications problem with the controller
	 */
	public boolean isConnected() throws RemoteException;
	
	/**
	 * Get the IP address of the machine the controller is running on.
	 * Should be implemented with: <code>return InetAddress.getLocalHost();</code>
	 * @return the IP address of the controlling machine
	 * @throws RemoteException if there is a communications problem with the controller
	 */
	public InetAddress getIpAddress() throws RemoteException;
}
